package guoanmaker.personal.helper.common.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtils {
	
	 
	 public static String getPara(String param){
		 Properties properties = new Properties();
		 InputStream in = PropertiesUtils.class.getResourceAsStream("./configInfo.properties");//或者直接写成"db.properties"
         try {
			properties.load(in);
		} catch (IOException e) {
			e.printStackTrace();
		}
         String url = properties.getProperty(param);
         return url;
	 }
	 
	 public static void main(String[] args) {
	       /* Properties properties = new Properties();
	        try {
	            InputStream in = PropertiesUtils.class.getResourceAsStream("./configInfo.properties");//或者直接写成"db.properties"
	            properties.load(in);
	            String url = properties.getProperty("bossurl");
	            
	            System.out.println("url="+url );
	        } catch (FileNotFoundException e) {
	            e.printStackTrace();
	        } catch (IOException e) {
	            e.printStackTrace();
	        }*/
		 
		 	System.out.println(getPara("artAuctionPicServerAddress"));
	    }
}
